﻿using System.ServiceModel;
using System.ServiceModel.Web;

namespace RESTfulAPI
{
    [ServiceContract]
    public interface IStudentQuery
    {
        [OperationContract]

        [WebGet(UriTemplate = "StudentQuery/{name}", ResponseFormat = WebMessageFormat.Json)]

        Student GetStudent(string name);


        [WebInvoke(UriTemplate = "/StudentQuery/StudentQueryByAge", Method = "POST", ResponseFormat = WebMessageFormat.Json)]
        Student GetStudentByage(int age);
    }
}
